
[dbo].[RecurringDonationExpectedPaymentSet]
CREATE TABLE [dbo].[RecurringDonationExpectedPaymentSet]
(
[RecurringDonationExpectedPaymentSetKey] [uniqueidentifier] NOT NULL,
[ExpectedPaymentDate] [datetime] NULL,
[RecurringDonationExpectedPaymentSetStatusCode] [smallint] NOT NULL,
[CreatedByUserKey] [uniqueidentifier] NOT NULL,
[CreatedOn] [datetime] NOT NULL CONSTRAINT [DF_RecurringDonationExpectedPaymentSet_CreatedOn] DEFAULT (getdate()),
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[UpdatedOn] [datetime] NOT NULL CONSTRAINT [DF_RecurringDonationExpectedPaymentSet_UpdatedOn] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RecurringDonationExpectedPaymentSet] ADD CONSTRAINT [PK_RecurringDonationExpectedPaymentSet] PRIMARY KEY CLUSTERED ([RecurringDonationExpectedPaymentSetKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RecurringDonationExpectedPaymentSet_ExpectedPaymentDate] ON [dbo].[RecurringDonationExpectedPaymentSet] ([ExpectedPaymentDate]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RecurringDonationExpectedPaymentSet] ADD CONSTRAINT [FK_RecurringDonationExpectedPaymentSet_RecurringDonationExpectedPaymentSetStatusRef] FOREIGN KEY ([RecurringDonationExpectedPaymentSetStatusCode]) REFERENCES [dbo].[RecurringDonationExpectedPaymentSetStatusRef] ([RecurringDonationExpectedPaymentSetStatusCode])
GO
ALTER TABLE [dbo].[RecurringDonationExpectedPaymentSet] ADD CONSTRAINT [FK_RecurringDonationExpectedPaymentSet_UserMain_CreatedBy] FOREIGN KEY ([CreatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
ALTER TABLE [dbo].[RecurringDonationExpectedPaymentSet] ADD CONSTRAINT [FK_RecurringDonationExpectedPaymentSet_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
GRANT REFERENCES ON [dbo].[RecurringDonationExpectedPaymentSet] TO [IMIS]
GRANT SELECT ON [dbo].[RecurringDonationExpectedPaymentSet] TO [IMIS]
GRANT INSERT ON [dbo].[RecurringDonationExpectedPaymentSet] TO [IMIS]
GRANT DELETE ON [dbo].[RecurringDonationExpectedPaymentSet] TO [IMIS]
GRANT UPDATE ON [dbo].[RecurringDonationExpectedPaymentSet] TO [IMIS]
GO